FROM ubuntu:16.04

MAINTAINER wucy

RUN useradd --no-log-init --shell /bin/bash oj

#安装jdk8
RUN sed 's/main$/main universe/' -i /etc/apt/sources.list

RUN apt-get update && apt-get install -y software-properties-common python-software-properties

RUN add-apt-repository ppa:webupd8team/java -y

RUN apt-get update

RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections

RUN apt-get install -y oracle-java8-installer
 
RUN apt-get install -y gcc

RUN apt-get update

RUN apt-get install -y g++-4.8

RUN apt-get install -y g++

RUN apt-get update

RUN echo 'mysql-server mysql-server/root_password password 801111' | debconf-set-selections && \ 
	echo 'mysql-server mysql-server/root_password_again password 801111' | debconf-set-selections && \
	apt-get install -y mysql-server

RUN apt-get install -y mysql-server libmysqlclient-dev

ONBUILD RUN apt-get update
